package tables;

import java.util.Date;

public class Entree implements Tables_SUPER {

	private int numAcces;
	private String code_batiment;
	private int codePointAcces;
	private String etat_entree;
	private java.sql.Date date_entree;
	
	public Entree(int numAcces, String code_batiment, int codePointAcces,
			String etat_entree, java.sql.Date date_entree) {
		this.numAcces = numAcces;
		this.code_batiment = code_batiment;
		this.codePointAcces = codePointAcces;
		this.etat_entree = etat_entree;
		this.date_entree = date_entree;
	}
	
	@Override
	public String insert() {
		java.util.Date today = new Date();
		java.sql.Date date = new java.sql.Date(today.getTime());
		String heure=today.getHours()+"-"+today.getMinutes()+"-"+today.getSeconds();
		return "INSERT INTO ENTREE VALUES("+numAcces+",'"+code_batiment+"',"+codePointAcces+",'"+etat_entree+"',TO_DATE('"+date+ " "+heure+"','YYYY-MM-DD HH24:MI:SS'))";
	}
	@Override
	public String update() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public String delete() {
		// TODO Auto-generated method stub
		return null;
	}
	
	//getter & setter
	public int getNumAcces() {
		return numAcces;
	}
	public void setNumAcces(int numAcces) {
		this.numAcces = numAcces;
	}
	public String getCode_batiment() {
		return code_batiment;
	}
	public void setCode_batiment(String code_batiment) {
		this.code_batiment = code_batiment;
	}
	public int getCodePointAcces() {
		return codePointAcces;
	}
	public void setCodePointAcces(int codePointAcces) {
		this.codePointAcces = codePointAcces;
	}
	public String getEtat_entree() {
		return etat_entree;
	}
	public void setEtat_entree(String etat_entree) {
		this.etat_entree = etat_entree;
	}
	public java.sql.Date getDate_entree() {
		return date_entree;
	}
	public void setDate_entree(java.sql.Date date_entree) {
		this.date_entree = date_entree;
	}
	

}
